package de.recipeminer.tools;

import java.util.Arrays;
import java.util.Iterator;

public class Tools {

    public static String joinPaths(String... paths) {
        String fileSep = System.getProperty("file.separator", "/");
        Iterator<String> pathIter = Arrays.asList(paths).iterator();
        StringBuffer sb = new StringBuffer();
        while (pathIter.hasNext()) {
            sb.append(pathIter.next());
            if(pathIter.hasNext()) {
                sb.append(fileSep);
            }
        }
        return sb.toString();
    }
}
